<%--
  Created by IntelliJ IDEA.
  User: PC
  Date: 2024/3/25
  Time: 11:23
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>所有商品</title>
</head>
<body>
<hr>
<table border="1" cellspacing="0" width="80%">
    <tr>
        <th>商品名称</th>
        <th>商品信息</th>
        <th>商品价格</th>
        <th>商品种类</th>
        <th>商品销量</th>
        <th>商品上架时间</th>
    </tr>

    <c:forEach items="${goodsList}" var="good">
        <tr align="center">
            <td>${good.goodsName}</td>
            <td>${good.goodsMessage}</td>
            <td>${good.price}</td>
            <td>${good.goodsType}</td>
            <td>${good.goodsXiaoLiang}</td>
            <td>${good.time}</td>
            <td><a href="/logindemo2/addToGouwucar?goodsID=${good.goodsID}">添加到购物车</a></td>
        </tr>
    </c:forEach>


</table>
<form action="searchGoods.jsp" method="post">
    <input type="submit" value="搜索商品"><br>
</form>
<form action="showAllGoods" method="post">
    <input type="submit" value="按商品发布时间升序排序"><br>
</form>
<form action="showAllGoodsLate" method="post">
    <input type="submit" value="按商品发布时间降序排序"><br>
</form>
<form action="showAllGoodsXiaoLiang" method="post">
    <input type="submit" value="按商品销量升序排序"><br>
</form>
<form action="showAllGoodsXiaoLiangLower" method="post">
    <input type="submit" value="按商品销量降序排序"><br>
</form>
<form action="showUserBuy.jsp" method="post">
    <input type="submit" value="返回主界面"><br>
</form>
</body>
</html>
